##!/usr/bin/sh
MAKE_PATH=$(cd "$(dirname "$0")"; pwd)
echo "make_achetype in "$MAKE_PATH
mvn clean
mvn archetype:create-from-project -DpackageName=com.absir.android.batch
#rm -r $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/bin
#rm -r $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/gen
rm -r $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/main/java/com
rm -r $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/main/java/net
mkdir $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/main/resources
mkdir $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/test
mkdir $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/test/java
mkdir $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/src/test/resources
rm -r $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/res
cp -r $MAKE_PATH/res $MAKE_PATH/target/generated-sources/archetype/src/main/resources/archetype-resources/res
cp -f $MAKE_PATH/archetype-metadata.xml $MAKE_PATH/target/generated-sources/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
